<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__crypto__lld__crc__functions.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Functions<div class="ingroups"><a class="el" href="group__group__crypto.html">Crypto       (Cryptography)</a> &raquo; <a class="el" href="group__group__crypto__lld__api.html">Direct Crypto Core Access</a> &raquo; <a class="el" href="group__group__crypto__lld__crc.html">Cyclic Redundancy Code (CRC)</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab46a10d2a00389c46d395ec11558fd2a"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__crypto__lld__crc__functions.html#gab46a10d2a00389c46d395ec11558fd2a">Cy_Crypto_Core_Crc_Init</a> (CRYPTO_Type *base, uint32_t polynomial, uint32_t dataReverse, uint32_t dataXor, uint32_t remReverse, uint32_t remXor)</td></tr>
<tr class="memdesc:gab46a10d2a00389c46d395ec11558fd2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the CRC calculation.  <a href="#gab46a10d2a00389c46d395ec11558fd2a">More...</a><br /></td></tr>
<tr class="separator:gab46a10d2a00389c46d395ec11558fd2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafcb164de5cf02e92d139848ed3d06b9b"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__crypto__lld__crc__functions.html#gafcb164de5cf02e92d139848ed3d06b9b">Cy_Crypto_Core_Crc</a> (CRYPTO_Type *base, uint32_t *crc, void const *data, uint32_t dataSize, uint32_t lfsrInitState)</td></tr>
<tr class="memdesc:gafcb164de5cf02e92d139848ed3d06b9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs the CRC calculation on a message.  <a href="#gafcb164de5cf02e92d139848ed3d06b9b">More...</a><br /></td></tr>
<tr class="separator:gafcb164de5cf02e92d139848ed3d06b9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga881e13920b637d25be9d8f98f5b10c91"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__crypto__lld__crc__functions.html#ga881e13920b637d25be9d8f98f5b10c91">Cy_Crypto_Core_Crc_CalcInit</a> (CRYPTO_Type *base, uint32_t width, uint32_t polynomial, uint32_t dataReverse, uint32_t dataXor, uint32_t remReverse, uint32_t remXor, uint32_t lfsrInitState)</td></tr>
<tr class="memdesc:ga881e13920b637d25be9d8f98f5b10c91"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the CRC calculation.  <a href="#ga881e13920b637d25be9d8f98f5b10c91">More...</a><br /></td></tr>
<tr class="separator:ga881e13920b637d25be9d8f98f5b10c91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0938a3c6dbdad2335b596484993f792f"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__crypto__lld__crc__functions.html#ga0938a3c6dbdad2335b596484993f792f">Cy_Crypto_Core_Crc_CalcStart</a> (CRYPTO_Type *base, uint32_t width, uint32_t lfsrInitState)</td></tr>
<tr class="memdesc:ga0938a3c6dbdad2335b596484993f792f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prepares the CRC calculation by setting an initial seed value.  <a href="#ga0938a3c6dbdad2335b596484993f792f">More...</a><br /></td></tr>
<tr class="separator:ga0938a3c6dbdad2335b596484993f792f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabe76f7cfc5b707af5258b501a23694ea"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__crypto__lld__crc__functions.html#gabe76f7cfc5b707af5258b501a23694ea">Cy_Crypto_Core_Crc_CalcPartial</a> (CRYPTO_Type *base, void const *data, uint32_t dataSize)</td></tr>
<tr class="memdesc:gabe76f7cfc5b707af5258b501a23694ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs the CRC calculation of a message part.  <a href="#gabe76f7cfc5b707af5258b501a23694ea">More...</a><br /></td></tr>
<tr class="separator:gabe76f7cfc5b707af5258b501a23694ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga631f9fe05a740971456d754637d481af"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__crypto__lld__crc__functions.html#ga631f9fe05a740971456d754637d481af">Cy_Crypto_Core_Crc_CalcFinish</a> (CRYPTO_Type *base, uint32_t width, uint32_t *crc)</td></tr>
<tr class="memdesc:ga631f9fe05a740971456d754637d481af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finalizes the CRC calculation.  <a href="#ga631f9fe05a740971456d754637d481af">More...</a><br /></td></tr>
<tr class="separator:ga631f9fe05a740971456d754637d481af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4f97802fcf9f38711103e24f1ad9c584"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__crypto__lld__crc__functions.html#ga4f97802fcf9f38711103e24f1ad9c584">Cy_Crypto_Core_Crc_Calc</a> (CRYPTO_Type *base, uint32_t width, uint32_t *crc, void const *data, uint32_t dataSize)</td></tr>
<tr class="memdesc:ga4f97802fcf9f38711103e24f1ad9c584"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs the CRC calculation on a message.  <a href="#ga4f97802fcf9f38711103e24f1ad9c584">More...</a><br /></td></tr>
<tr class="separator:ga4f97802fcf9f38711103e24f1ad9c584"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="gab46a10d2a00389c46d395ec11558fd2a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab46a10d2a00389c46d395ec11558fd2a">&#9670;&nbsp;</a></span>Cy_Crypto_Core_Crc_Init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> Cy_Crypto_Core_Crc_Init </td>
          <td>(</td>
          <td class="paramtype">CRYPTO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>polynomial</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>dataReverse</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>dataXor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>remReverse</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>remXor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the CRC calculation. </p>
<p>Call to initialize this encryption technique before using any associated functions. You must initialize this technique again after using any other encryption technique.</p>
<p>Below is the table with known polynomials with different parameters and their calculated CRCs from the string <b>"123456789"</b>: </p><table class="doxtable">
<tr>
<th align="left">Name </th><th align="center">Width </th><th align="center">Poly </th><th align="center">Init </th><th align="center">Data Rev </th><th align="center">Data XOR </th><th align="center">Rem Rev </th><th align="center">Rem XOR </th><th align="center">Expected CRC  </th></tr>
<tr>
<td align="left">CRC-3 / ROHC </td><td align="center">3 </td><td align="center">0x3 </td><td align="center">0x7 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0 </td><td align="center">0x6 </td></tr>
<tr>
<td align="left">CRC-4 / ITU </td><td align="center">4 </td><td align="center">0x3 </td><td align="center">0x0 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0 </td><td align="center">0x7 </td></tr>
<tr>
<td align="left">CRC-5 / EPC </td><td align="center">5 </td><td align="center">0x9 </td><td align="center">0x9 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0x0 </td></tr>
<tr>
<td align="left">CRC-5 / ITU </td><td align="center">5 </td><td align="center">0x15 </td><td align="center">0x0 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0 </td><td align="center">0x7 </td></tr>
<tr>
<td align="left">CRC-5 / USB </td><td align="center">5 </td><td align="center">0x5 </td><td align="center">0x1F </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x1F </td><td align="center">0x19 </td></tr>
<tr>
<td align="left">CRC-6 / CDMA2000-A </td><td align="center">6 </td><td align="center">0x27 </td><td align="center">0x3F </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0xD </td></tr>
<tr>
<td align="left">CRC-6 / CDMA2000-B </td><td align="center">6 </td><td align="center">0x7 </td><td align="center">0x3F </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0x3B </td></tr>
<tr>
<td align="left">CRC-6 / DARC </td><td align="center">6 </td><td align="center">0x19 </td><td align="center">0x0 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0 </td><td align="center">0x26 </td></tr>
<tr>
<td align="left">CRC-6 / ITU </td><td align="center">6 </td><td align="center">0x3 </td><td align="center">0x0 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0 </td><td align="center">0x6 </td></tr>
<tr>
<td align="left">CRC-7 </td><td align="center">7 </td><td align="center">0x9 </td><td align="center">0x0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0x75 </td></tr>
<tr>
<td align="left">CRC-7 / ROHC </td><td align="center">7 </td><td align="center">0x4F </td><td align="center">0x7F </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0 </td><td align="center">0x53 </td></tr>
<tr>
<td align="left">CRC-8 </td><td align="center">8 </td><td align="center">0x7 </td><td align="center">0x0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0xF4 </td></tr>
<tr>
<td align="left">CRC-8 / CDMA2000 </td><td align="center">8 </td><td align="center">0x9B </td><td align="center">0xFF </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0xDA </td></tr>
<tr>
<td align="left">CRC-8 / DARC </td><td align="center">8 </td><td align="center">0x39 </td><td align="center">0x0 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0 </td><td align="center">0x15 </td></tr>
<tr>
<td align="left">CRC-8 / DVB-S2 </td><td align="center">8 </td><td align="center">0xD5 </td><td align="center">0x0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0xBC </td></tr>
<tr>
<td align="left">CRC-8 / EBU </td><td align="center">8 </td><td align="center">0x1D </td><td align="center">0xFF </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0 </td><td align="center">0x97 </td></tr>
<tr>
<td align="left">CRC-8 / I-CODE </td><td align="center">8 </td><td align="center">0x1D </td><td align="center">0xFD </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0x7E </td></tr>
<tr>
<td align="left">CRC-8 / ITU </td><td align="center">8 </td><td align="center">0x7 </td><td align="center">0x0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x55 </td><td align="center">0xA1 </td></tr>
<tr>
<td align="left">CRC-8 / MAXIM </td><td align="center">8 </td><td align="center">0x31 </td><td align="center">0x0 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0 </td><td align="center">0xA1 </td></tr>
<tr>
<td align="left">CRC-8 / ROHC </td><td align="center">8 </td><td align="center">0x7 </td><td align="center">0xFF </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0 </td><td align="center">0xD0 </td></tr>
<tr>
<td align="left">CRC-8 / WCDMA </td><td align="center">8 </td><td align="center">0x9B </td><td align="center">0x0 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0 </td><td align="center">0x25 </td></tr>
<tr>
<td align="left">CRC-10 </td><td align="center">10 </td><td align="center">0x233 </td><td align="center">0x0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0x199 </td></tr>
<tr>
<td align="left">CRC-10 / CDMA2000 </td><td align="center">10 </td><td align="center">0x3D9 </td><td align="center">0x3FF </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0x233 </td></tr>
<tr>
<td align="left">CRC-11 </td><td align="center">11 </td><td align="center">0x385 </td><td align="center">0x1A </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0x5A3 </td></tr>
<tr>
<td align="left">CRC-12 / 3GPP </td><td align="center">12 </td><td align="center">0x80F </td><td align="center">0x0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0 </td><td align="center">0xDAF </td></tr>
<tr>
<td align="left">CRC-12 / CDMA2000 </td><td align="center">12 </td><td align="center">0xF13 </td><td align="center">0xFFF </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0xD4D </td></tr>
<tr>
<td align="left">CRC-12 / DECT </td><td align="center">12 </td><td align="center">0x80F </td><td align="center">0x0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0xF5B </td></tr>
<tr>
<td align="left">CRC-13 / BBC </td><td align="center">13 </td><td align="center">0x1CF5 </td><td align="center">0x0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0x4FA </td></tr>
<tr>
<td align="left">CRC-14 / DARC </td><td align="center">14 </td><td align="center">0x805 </td><td align="center">0x0 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0 </td><td align="center">0x82D </td></tr>
<tr>
<td align="left">CRC-15 </td><td align="center">15 </td><td align="center">0x4599 </td><td align="center">0x0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0x59E </td></tr>
<tr>
<td align="left">CRC-15 / MPT1327 </td><td align="center">15 </td><td align="center">0x6815 </td><td align="center">0x0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x1 </td><td align="center">0x2566 </td></tr>
<tr>
<td align="left">CRC-24 </td><td align="center">24 </td><td align="center">0x0864CFB </td><td align="center">0x00B704CE </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0x21CF02 </td></tr>
<tr>
<td align="left">CRC-24 / FLEXRAY-A </td><td align="center">24 </td><td align="center">0x05D6DCB </td><td align="center">0x00FEDCBA </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0x7979BD </td></tr>
<tr>
<td align="left">CRC-24 / FLEXRAY-B </td><td align="center">24 </td><td align="center">0x05D6DCB </td><td align="center">0x00ABCDEF </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0 </td><td align="center">0x1F23B8 </td></tr>
<tr>
<td align="left">CRC-31 / PHILIPS </td><td align="center">31 </td><td align="center">0x4C11DB7 </td><td align="center">0x7FFFFFFF </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x7FFFFFFF </td><td align="center">0xCE9E46C </td></tr>
<tr>
<td align="left">CRC-16 / ARC </td><td align="center">16 </td><td align="center">0x8005 </td><td align="center">0x0000 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0000 </td><td align="center">0xBB3D </td></tr>
<tr>
<td align="left">CRC-16 / AUG-CCITT </td><td align="center">16 </td><td align="center">0x1021 </td><td align="center">0x1D0F </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0000 </td><td align="center">0xE5CC </td></tr>
<tr>
<td align="left">CRC-16 / BUYPASS </td><td align="center">16 </td><td align="center">0x8005 </td><td align="center">0x0000 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0000 </td><td align="center">0xFEE8 </td></tr>
<tr>
<td align="left">CRC-16 / CCITT-0 </td><td align="center">16 </td><td align="center">0x1021 </td><td align="center">0xFFFF </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0000 </td><td align="center">0x29B1 </td></tr>
<tr>
<td align="left">CRC-16 / CDMA2000 </td><td align="center">16 </td><td align="center">0xC867 </td><td align="center">0xFFFF </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0000 </td><td align="center">0x4C06 </td></tr>
<tr>
<td align="left">CRC-16 / DDS-110 </td><td align="center">16 </td><td align="center">0x8005 </td><td align="center">0x800D </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0000 </td><td align="center">0x9ECF </td></tr>
<tr>
<td align="left">CRC-16 / DECT-R </td><td align="center">16 </td><td align="center">0x0589 </td><td align="center">0x0000 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0001 </td><td align="center">0x007E </td></tr>
<tr>
<td align="left">CRC-16 / DECT-X </td><td align="center">16 </td><td align="center">0x0589 </td><td align="center">0x0000 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0000 </td><td align="center">0x007F </td></tr>
<tr>
<td align="left">CRC-16 / DNP </td><td align="center">16 </td><td align="center">0x3D65 </td><td align="center">0x0000 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0xFFFF </td><td align="center">0xEA82 </td></tr>
<tr>
<td align="left">CRC-16 / EN-13757 </td><td align="center">16 </td><td align="center">0x3D65 </td><td align="center">0x0000 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0xFFFF </td><td align="center">0xC2B7 </td></tr>
<tr>
<td align="left">CRC-16 / GENIBUS </td><td align="center">16 </td><td align="center">0x1021 </td><td align="center">0xFFFF </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0xFFFF </td><td align="center">0xD64E </td></tr>
<tr>
<td align="left">CRC-16 / MAXIM </td><td align="center">16 </td><td align="center">0x8005 </td><td align="center">0x0000 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0xFFFF </td><td align="center">0x44C2 </td></tr>
<tr>
<td align="left">CRC-16 / MCRF4XX </td><td align="center">16 </td><td align="center">0x1021 </td><td align="center">0xFFFF </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0000 </td><td align="center">0x6F91 </td></tr>
<tr>
<td align="left">CRC-16 / RIELLO </td><td align="center">16 </td><td align="center">0x1021 </td><td align="center">0xB2AA </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0000 </td><td align="center">0x63D0 </td></tr>
<tr>
<td align="left">CRC-16 / T10-DIF </td><td align="center">16 </td><td align="center">0x8BB7 </td><td align="center">0x0000 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0000 </td><td align="center">0xD0DB </td></tr>
<tr>
<td align="left">CRC-16 / TELEDISK </td><td align="center">16 </td><td align="center">0xA097 </td><td align="center">0x0000 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0000 </td><td align="center">0x0FB3 </td></tr>
<tr>
<td align="left">CRC-16 / TMS37157 </td><td align="center">16 </td><td align="center">0x1021 </td><td align="center">0x89EC </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0000 </td><td align="center">0x26B1 </td></tr>
<tr>
<td align="left">CRC-16 / USB </td><td align="center">16 </td><td align="center">0x8005 </td><td align="center">0xFFFF </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0xFFFF </td><td align="center">0xB4C8 </td></tr>
<tr>
<td align="left">CRC-A </td><td align="center">16 </td><td align="center">0x1021 </td><td align="center">0xC6C6 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0000 </td><td align="center">0xBF05 </td></tr>
<tr>
<td align="left">CRC-16 / KERMIT </td><td align="center">16 </td><td align="center">0x1021 </td><td align="center">0x0000 </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0000 </td><td align="center">0x2189 </td></tr>
<tr>
<td align="left">CRC-16 / MODBUS </td><td align="center">16 </td><td align="center">0x8005 </td><td align="center">0xFFFF </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x0000 </td><td align="center">0x4B37 </td></tr>
<tr>
<td align="left">CRC-16 / X-25 </td><td align="center">16 </td><td align="center">0x1021 </td><td align="center">0xFFFF </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0xFFFF </td><td align="center">0x906E </td></tr>
<tr>
<td align="left">CRC-16 / XMODEM </td><td align="center">16 </td><td align="center">0x1021 </td><td align="center">0x0000 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x0000 </td><td align="center">0x31C3 </td></tr>
<tr>
<td align="left">CRC-32 </td><td align="center">32 </td><td align="center">0x04C11DB7 </td><td align="center">0xFFFFFFFF </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0xFFFFFFFF </td><td align="center">0xCBF43926 </td></tr>
<tr>
<td align="left">CRC-32 / BZIP2 </td><td align="center">32 </td><td align="center">0x04C11DB7 </td><td align="center">0xFFFFFFFF </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0xFFFFFFFF </td><td align="center">0xFC891918 </td></tr>
<tr>
<td align="left">CRC-32C </td><td align="center">32 </td><td align="center">0x1EDC6F41 </td><td align="center">0xFFFFFFFF </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0xFFFFFFFF </td><td align="center">0xE3069283 </td></tr>
<tr>
<td align="left">CRC-32D </td><td align="center">32 </td><td align="center">0xA833982B </td><td align="center">0xFFFFFFFF </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0xFFFFFFFF </td><td align="center">0x87315576 </td></tr>
<tr>
<td align="left">CRC-32 / MPEG-2 </td><td align="center">32 </td><td align="center">0x04C11DB7 </td><td align="center">0xFFFFFFFF </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x00000000 </td><td align="center">0x0376E6E7 </td></tr>
<tr>
<td align="left">CRC-32 / POSIX </td><td align="center">32 </td><td align="center">0x04C11DB7 </td><td align="center">0x00000000 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0xFFFFFFFF </td><td align="center">0x765E7680 </td></tr>
<tr>
<td align="left">CRC-32Q </td><td align="center">32 </td><td align="center">0x814141AB </td><td align="center">0x00000000 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x00000000 </td><td align="center">0x3010BF7F </td></tr>
<tr>
<td align="left">CRC-32 / JAMCRC </td><td align="center">32 </td><td align="center">0x04C11DB7 </td><td align="center">0xFFFFFFFF </td><td align="center">1 </td><td align="center">0 </td><td align="center">1 </td><td align="center">0x00000000 </td><td align="center">0x340BC6D9 </td></tr>
<tr>
<td align="left">CRC-32 / XFER </td><td align="center">32 </td><td align="center">0x000000AF </td><td align="center">0x00000000 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0 </td><td align="center">0x00000000 </td><td align="center">0xBD0BE338 </td></tr>
</table>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTO instance.</td></tr>
    <tr><td class="paramname">polynomial</td><td>The polynomial (specified using 32 bits) used in the computing CRC.</td></tr>
    <tr><td class="paramname">dataReverse</td><td>The order in which data bytes are processed. 0 - MSB first; 1- LSB first.</td></tr>
    <tr><td class="paramname">dataXor</td><td>The byte mask for XORing data.</td></tr>
    <tr><td class="paramname">remReverse</td><td>A remainder reverse: 0 means the remainder is not reversed. 1 means reversed.</td></tr>
    <tr><td class="paramname">remXor</td><td>Specifies the mask with which the LFSR32 register is XORed to produce a remainder.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> </dd></dl>

</div>
</div>
<a id="gafcb164de5cf02e92d139848ed3d06b9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafcb164de5cf02e92d139848ed3d06b9b">&#9670;&nbsp;</a></span>Cy_Crypto_Core_Crc()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> Cy_Crypto_Core_Crc </td>
          <td>(</td>
          <td class="paramtype">CRYPTO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>crc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void const *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>dataSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>lfsrInitState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs the CRC calculation on a message. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTO instance.</td></tr>
    <tr><td class="paramname">crc</td><td>The pointer to a computed CRC value. Must be 4-byte aligned.</td></tr>
    <tr><td class="paramname">data</td><td>The pointer to the message whose CRC is being computed.</td></tr>
    <tr><td class="paramname">dataSize</td><td>The size of a message in bytes.</td></tr>
    <tr><td class="paramname">lfsrInitState</td><td>The initial state of the LFSR.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> </dd></dl>

</div>
</div>
<a id="ga881e13920b637d25be9d8f98f5b10c91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga881e13920b637d25be9d8f98f5b10c91">&#9670;&nbsp;</a></span>Cy_Crypto_Core_Crc_CalcInit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> Cy_Crypto_Core_Crc_CalcInit </td>
          <td>(</td>
          <td class="paramtype">CRYPTO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>polynomial</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>dataReverse</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>dataXor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>remReverse</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>remXor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>lfsrInitState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the CRC calculation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTO instance.</td></tr>
    <tr><td class="paramname">width</td><td>The CRC width in bits.</td></tr>
    <tr><td class="paramname">polynomial</td><td>The polynomial (specified using 32 bits) used in the computing CRC.</td></tr>
    <tr><td class="paramname">dataReverse</td><td>The order in which data bytes are processed. 0 - MSB first; 1 - LSB first.</td></tr>
    <tr><td class="paramname">dataXor</td><td>The byte mask for XORing data</td></tr>
    <tr><td class="paramname">remReverse</td><td>A remainder reverse: 0 means the remainder is not reversed. 1 means reversed.</td></tr>
    <tr><td class="paramname">remXor</td><td>Specifies the mask with which the LFSR32 register is XORed to produce a remainder.</td></tr>
    <tr><td class="paramname">lfsrInitState</td><td>The initial state of the LFSR.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a></dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* CRC parameters for some CRC algorithms:</span></div><div class="line"><span class="comment">    +---------------------+-----+------------+------------+------+------+-----+------------+------------+</span></div><div class="line"><span class="comment">    | CRC algorithm Name  | CRC |  Polynom   |   Initial  | Data | Data | Rem |  Remainder |  Expected  |</span></div><div class="line"><span class="comment">    |                     | len |            |    seed    | REV  | XOR  | REV |    XOR     |    CRC     |</span></div><div class="line"><span class="comment">    | ------------------- | --- | ---------- |----------- | ---- | ---- | --- | ---------- | ---------- |</span></div><div class="line"><span class="comment">    | CRC-6  / CDMA2000-A |  6  |    0x27    |    0x3F    |   0  |   0  |  0  |    0x00    |    0x0D    |</span></div><div class="line"><span class="comment">    | CRC-6  / CDMA2000-B |  6  |    0x07    |    0x3F    |   0  |   0  |  0  |    0x00    |    0x3B    |</span></div><div class="line"><span class="comment">    | CRC-6  / DARC       |  6  |    0x19    |    0x00    |   1  |   0  |  1  |    0x00    |    0x26    |</span></div><div class="line"><span class="comment">    | CRC-6  / ITU        |  6  |    0x03    |    0x00    |   1  |   0  |  1  |    0x00    |    0x06    |</span></div><div class="line"><span class="comment">    | CRC-8  / ITU        |  8  |    0x07    |    0x00    |   0  |   0  |  0  |    0x55    |    0xA1    |</span></div><div class="line"><span class="comment">    | CRC-8  / MAXIM      |  8  |    0x31    |    0x00    |   1  |   0  |  1  |    0x00    |    0xA1    |</span></div><div class="line"><span class="comment">    | CRC-8  / ROHC       |  8  |    0x07    |    0xFF    |   1  |   0  |  1  |    0x00    |    0xD0    |</span></div><div class="line"><span class="comment">    | CRC-8  / WCDMA      |  8  |    0x9B    |    0x00    |   1  |   0  |  1  |    0x00    |    0x25    |</span></div><div class="line"><span class="comment">    | CRC-16 / CCITT-0    | 16  |   0x1021   |   0xFFFF   |   0  |   0  |  0  |   0x0000   |   0x29B1   |</span></div><div class="line"><span class="comment">    | CRC-16 / CDMA2000   | 16  |   0xC867   |   0xFFFF   |   0  |   0  |  0  |   0x0000   |   0x4C06   |</span></div><div class="line"><span class="comment">    | CRC-32              | 32  | 0x04C11DB7 | 0xFFFFFFFF |   1  |   0  |  1  | 0xFFFFFFFF | 0xCBF43926 |</span></div><div class="line"><span class="comment">    | CRC-32 / BZIP2      | 32  | 0x04C11DB7 | 0xFFFFFFFF |   0  |   0  |  0  | 0xFFFFFFFF | 0xFC891918 |</span></div><div class="line"><span class="comment">    +---------------------+-----+------------+------------+------+------+-----+------------+------------+</span></div><div class="line"><span class="comment">    */</span></div><div class="line"></div><div class="line">    <span class="comment">/* Use &quot;CRC-16/CCITT-0&quot; calculation */</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_WIDTH           (16u)</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_POLYNOMIAL      (0x1021)</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_LFSR_SEED       (0xffff)</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_DATA_REVERSE    (0u)</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_DATA_XOR        (0u)</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_REM_REVERSE     (0u)</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_REM_XOR         (0x0000)</span></div><div class="line"></div><div class="line">    uint8_t message[9] = <span class="stringliteral">&quot;123456789&quot;</span>;</div><div class="line">    uint32_t calculatedCrc = 0;</div><div class="line"></div><div class="line">    <a class="code" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> cryptoStatus;</div><div class="line"></div><div class="line">    <span class="comment">/* Initialization Crypto operation */</span></div><div class="line">    cryptoStatus = <a class="code" href="group__group__crypto__lld__crc__functions.html#ga881e13920b637d25be9d8f98f5b10c91">Cy_Crypto_Core_Crc_CalcInit</a>(</div><div class="line">                             CRYPTO_HW,</div><div class="line">                             CRC16CCITT_WIDTH,</div><div class="line">                             CRC16CCITT_POLYNOMIAL,</div><div class="line">                             CRC16CCITT_DATA_REVERSE,</div><div class="line">                             CRC16CCITT_DATA_XOR,</div><div class="line">                             CRC16CCITT_REM_REVERSE,</div><div class="line">                             CRC16CCITT_REM_XOR,</div><div class="line">                             CRC16CCITT_LFSR_SEED);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    <span class="comment">/* Calculate CRC */</span></div><div class="line">    cryptoStatus = <a class="code" href="group__group__crypto__lld__crc__functions.html#ga4f97802fcf9f38711103e24f1ad9c584">Cy_Crypto_Core_Crc_Calc</a>(</div><div class="line">                             CRYPTO_HW,         <span class="comment">/* Pointer to Crypto instance */</span></div><div class="line">                             CRC16CCITT_WIDTH,            <span class="comment">/* CRC width in bits*/</span></div><div class="line">                             &amp;calculatedCrc,         <span class="comment">/* Pointer to CRC result */</span></div><div class="line">                             (<span class="keywordtype">void</span>*)message,            <span class="comment">/* Pointer to message */</span></div><div class="line">                             <span class="keyword">sizeof</span>(message));             <span class="comment">/* Size of message */</span></div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga0938a3c6dbdad2335b596484993f792f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0938a3c6dbdad2335b596484993f792f">&#9670;&nbsp;</a></span>Cy_Crypto_Core_Crc_CalcStart()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> Cy_Crypto_Core_Crc_CalcStart </td>
          <td>(</td>
          <td class="paramtype">CRYPTO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>lfsrInitState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Prepares the CRC calculation by setting an initial seed value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTO instance.</td></tr>
    <tr><td class="paramname">width</td><td>The CRC width in bits.</td></tr>
    <tr><td class="paramname">lfsrInitState</td><td>The initial state of the LFSR.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> </dd></dl>

</div>
</div>
<a id="gabe76f7cfc5b707af5258b501a23694ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabe76f7cfc5b707af5258b501a23694ea">&#9670;&nbsp;</a></span>Cy_Crypto_Core_Crc_CalcPartial()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> Cy_Crypto_Core_Crc_CalcPartial </td>
          <td>(</td>
          <td class="paramtype">CRYPTO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void const *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>dataSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs the CRC calculation of a message part. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTO instance.</td></tr>
    <tr><td class="paramname">data</td><td>The pointer to the message whose CRC is being computed.</td></tr>
    <tr><td class="paramname">dataSize</td><td>The size of a message in bytes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> </dd></dl>

</div>
</div>
<a id="ga631f9fe05a740971456d754637d481af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga631f9fe05a740971456d754637d481af">&#9670;&nbsp;</a></span>Cy_Crypto_Core_Crc_CalcFinish()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> Cy_Crypto_Core_Crc_CalcFinish </td>
          <td>(</td>
          <td class="paramtype">CRYPTO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>crc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finalizes the CRC calculation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTO instance.</td></tr>
    <tr><td class="paramname">width</td><td>The CRC width in bits.</td></tr>
    <tr><td class="paramname">crc</td><td>The pointer to a computed CRC value. Must be 4-byte aligned.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> </dd></dl>

</div>
</div>
<a id="ga4f97802fcf9f38711103e24f1ad9c584"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4f97802fcf9f38711103e24f1ad9c584">&#9670;&nbsp;</a></span>Cy_Crypto_Core_Crc_Calc()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> Cy_Crypto_Core_Crc_Calc </td>
          <td>(</td>
          <td class="paramtype">CRYPTO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>crc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void const *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>dataSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs the CRC calculation on a message. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the CRYPTO instance.</td></tr>
    <tr><td class="paramname">width</td><td>The CRC width in bits.</td></tr>
    <tr><td class="paramname">crc</td><td>The pointer to a computed CRC value. Must be 4-byte aligned.</td></tr>
    <tr><td class="paramname">data</td><td>The pointer to the message whose CRC is being computed.</td></tr>
    <tr><td class="paramname">dataSize</td><td>The size of a message in bytes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a></dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* CRC parameters for some CRC algorithms:</span></div><div class="line"><span class="comment">    +---------------------+-----+------------+------------+------+------+-----+------------+------------+</span></div><div class="line"><span class="comment">    | CRC algorithm Name  | CRC |  Polynom   |   Initial  | Data | Data | Rem |  Remainder |  Expected  |</span></div><div class="line"><span class="comment">    |                     | len |            |    seed    | REV  | XOR  | REV |    XOR     |    CRC     |</span></div><div class="line"><span class="comment">    | ------------------- | --- | ---------- |----------- | ---- | ---- | --- | ---------- | ---------- |</span></div><div class="line"><span class="comment">    | CRC-6  / CDMA2000-A |  6  |    0x27    |    0x3F    |   0  |   0  |  0  |    0x00    |    0x0D    |</span></div><div class="line"><span class="comment">    | CRC-6  / CDMA2000-B |  6  |    0x07    |    0x3F    |   0  |   0  |  0  |    0x00    |    0x3B    |</span></div><div class="line"><span class="comment">    | CRC-6  / DARC       |  6  |    0x19    |    0x00    |   1  |   0  |  1  |    0x00    |    0x26    |</span></div><div class="line"><span class="comment">    | CRC-6  / ITU        |  6  |    0x03    |    0x00    |   1  |   0  |  1  |    0x00    |    0x06    |</span></div><div class="line"><span class="comment">    | CRC-8  / ITU        |  8  |    0x07    |    0x00    |   0  |   0  |  0  |    0x55    |    0xA1    |</span></div><div class="line"><span class="comment">    | CRC-8  / MAXIM      |  8  |    0x31    |    0x00    |   1  |   0  |  1  |    0x00    |    0xA1    |</span></div><div class="line"><span class="comment">    | CRC-8  / ROHC       |  8  |    0x07    |    0xFF    |   1  |   0  |  1  |    0x00    |    0xD0    |</span></div><div class="line"><span class="comment">    | CRC-8  / WCDMA      |  8  |    0x9B    |    0x00    |   1  |   0  |  1  |    0x00    |    0x25    |</span></div><div class="line"><span class="comment">    | CRC-16 / CCITT-0    | 16  |   0x1021   |   0xFFFF   |   0  |   0  |  0  |   0x0000   |   0x29B1   |</span></div><div class="line"><span class="comment">    | CRC-16 / CDMA2000   | 16  |   0xC867   |   0xFFFF   |   0  |   0  |  0  |   0x0000   |   0x4C06   |</span></div><div class="line"><span class="comment">    | CRC-32              | 32  | 0x04C11DB7 | 0xFFFFFFFF |   1  |   0  |  1  | 0xFFFFFFFF | 0xCBF43926 |</span></div><div class="line"><span class="comment">    | CRC-32 / BZIP2      | 32  | 0x04C11DB7 | 0xFFFFFFFF |   0  |   0  |  0  | 0xFFFFFFFF | 0xFC891918 |</span></div><div class="line"><span class="comment">    +---------------------+-----+------------+------------+------+------+-----+------------+------------+</span></div><div class="line"><span class="comment">    */</span></div><div class="line"></div><div class="line">    <span class="comment">/* Use &quot;CRC-16/CCITT-0&quot; calculation */</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_WIDTH           (16u)</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_POLYNOMIAL      (0x1021)</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_LFSR_SEED       (0xffff)</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_DATA_REVERSE    (0u)</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_DATA_XOR        (0u)</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_REM_REVERSE     (0u)</span></div><div class="line"><span class="preprocessor">    #define CRC16CCITT_REM_XOR         (0x0000)</span></div><div class="line"></div><div class="line">    uint8_t message[9] = <span class="stringliteral">&quot;123456789&quot;</span>;</div><div class="line">    uint32_t calculatedCrc = 0;</div><div class="line"></div><div class="line">    <a class="code" href="group__group__crypto__enums.html#ga3a65158da3dc5cb6aa016ae599542aad">cy_en_crypto_status_t</a> cryptoStatus;</div><div class="line"></div><div class="line">    <span class="comment">/* Initialization Crypto operation */</span></div><div class="line">    cryptoStatus = <a class="code" href="group__group__crypto__lld__crc__functions.html#ga881e13920b637d25be9d8f98f5b10c91">Cy_Crypto_Core_Crc_CalcInit</a>(</div><div class="line">                             CRYPTO_HW,</div><div class="line">                             CRC16CCITT_WIDTH,</div><div class="line">                             CRC16CCITT_POLYNOMIAL,</div><div class="line">                             CRC16CCITT_DATA_REVERSE,</div><div class="line">                             CRC16CCITT_DATA_XOR,</div><div class="line">                             CRC16CCITT_REM_REVERSE,</div><div class="line">                             CRC16CCITT_REM_XOR,</div><div class="line">                             CRC16CCITT_LFSR_SEED);</div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div><div class="line">    <span class="comment">/* Calculate CRC */</span></div><div class="line">    cryptoStatus = <a class="code" href="group__group__crypto__lld__crc__functions.html#ga4f97802fcf9f38711103e24f1ad9c584">Cy_Crypto_Core_Crc_Calc</a>(</div><div class="line">                             CRYPTO_HW,         <span class="comment">/* Pointer to Crypto instance */</span></div><div class="line">                             CRC16CCITT_WIDTH,            <span class="comment">/* CRC width in bits*/</span></div><div class="line">                             &amp;calculatedCrc,         <span class="comment">/* Pointer to CRC result */</span></div><div class="line">                             (<span class="keywordtype">void</span>*)message,            <span class="comment">/* Pointer to message */</span></div><div class="line">                             <span class="keyword">sizeof</span>(message));             <span class="comment">/* Size of message */</span></div><div class="line"></div><div class="line">    <span class="comment">/* ... check for errors... */</span></div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
